import 'dart:io';

import 'package:get/get.dart';
import 'package:pet/app/http.dart';
import 'package:pet/app/storage/token.dart';

class ChatProvider extends BaseProvider {
  Future<Response> uploadImage(File file) {
    TokenStorage tokenStorage = Get.find<TokenStorage>();

    String token = tokenStorage.getToken();
    final FormData forData = FormData(
        {'file': MultipartFile(file, filename: 'file.jpg'), 'token': token});

    return post('/api/tiny-service/v1/common/file/socket-images', forData);
  }
}
